import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String str=sc.next();
        int BigCount=0;
        int SmallCount=0;
        for (int i = 0; i <str.length(); i++) {
            char c=str.charAt(i);
            if(c>='a'&&c<='z')
            {
                SmallCount++;
            }
            else if(c>='A'&&c<='Z')
            {
                BigCount++;
            }

        }
        System.out.println("大写字母有"+BigCount+"个");
        System.out.println("小写字母有"+SmallCount+"个");

    }
}
